/**
 * 入口组件
 * */
import React from "react";
// import { Redirect } from "react-router-dom";
import { ConfigProvider } from "antd";
import zhCN from 'antd/es/locale/zh_CN';
import Main from "../main";
import { useWindoweScale } from "../../utils/customHook";
// import { CookieUtil } from "../../utils/caches";

const width = 1920;
const height = 1080;

const App = () => {

  const scale = useWindoweScale();

  // const sessionId = CookieUtil.get("sessionId");
  // if (!sessionId) {
  //   return <Redirect to="/login" />; // 自动跳转到指定的路由路径
  // }
  return (
    <ConfigProvider locale={zhCN}> 
      <div id="mian-scale-box" style={{ width, height, transform: `scale(${scale}) translate(-50%, -50%)` }}>
        <Main />
      </div>
    </ConfigProvider>
  );
};

export default App;
